Optimal. Leaf size=71 \[ \frac {a^3 \tan (e+f x)}{c f}-\frac {4 i a^3}{f (c-i c \tan (e+f x))}+\frac {4 i a^3 \log (\cos (e+f x))}{c f}-\frac {4 a^3 x}{c} \]
[Out]
________________________________________________________________________________________
Rubi [A] time = 0.12, antiderivative size = 71, normalized size of antiderivative = 1.00, number of steps used = 4, number of rules used = 3, integrand size = 31, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.097, Rules used = {3522, 3487, 43} \[ \frac {a^3 \tan (e+f x)}{c f}-\frac {4 i a^3}{f (c-i c \tan (e+f x))}+\frac {4 i a^3 \log (\cos (e+f x))}{c f}-\frac {4 a^3 x}{c} \]
Antiderivative was successfully verified.
[In]
[Out]
Rule 43
Rule 3487
Rule 3522
Rubi steps
\begin {align*} \int \frac {(a+i a \tan (e+f x))^3}{c-i c \tan (e+f x)} \, dx &=\left (a^3 c^3\right ) \int \frac {\sec ^6(e+f x)}{(c-i c \tan (e+f x))^4} \, dx\\ &=\frac {\left (i a^3\right ) \operatorname {Subst}\left (\int \frac {(c-x)^2}{(c+x)^2} \, dx,x,-i c \tan (e+f x)\right )}{c^2 f}\\ &=\frac {\left (i a^3\right ) \operatorname {Subst}\left (\int \left (1+\frac {4 c^2}{(c+x)^2}-\frac {4 c}{c+x}\right ) \, dx,x,-i c \tan (e+f x)\right )}{c^2 f}\\ &=-\frac {4 a^3 x}{c}+\frac {4 i a^3 \log (\cos (e+f x))}{c f}+\frac {a^3 \tan (e+f x)}{c f}-\frac {4 i a^3}{f (c-i c \tan (e+f x))}\\ \end {align*}
________________________________________________________________________________________
Mathematica [B] time = 2.70, size = 214, normalized size = 3.01 \[ \frac {a^3 \sec (e) (\tan (e+f x)-i) \left (-2 f x \sin (e+2 f x)+2 i \sin (e+2 f x)-2 f x \sin (3 e+2 f x)+i \sin (3 e+2 f x)-2 i f x \cos (3 e+2 f x)+\cos (3 e+2 f x)-\cos (3 e+2 f x) \log \left (\cos ^2(e+f x)\right )+\cos (e) \left (-2 \log \left (\cos ^2(e+f x)\right )-4 i f x+3\right )+\cos (e+2 f x) \left (-\log \left (\cos ^2(e+f x)\right )-2 i f x\right )+i \sin (e+2 f x) \log \left (\cos ^2(e+f x)\right )+i \sin (3 e+2 f x) \log \left (\cos ^2(e+f x)\right )-i \sin (e)\right )}{2 c f} \]
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
fricas [A] time = 0.48, size = 86, normalized size = 1.21 \[ \frac {-2 i \, a^{3} e^{\left (4 i \, f x + 4 i \, e\right )} - 2 i \, a^{3} e^{\left (2 i \, f x + 2 i \, e\right )} + 2 i \, a^{3} + {\left (4 i \, a^{3} e^{\left (2 i \, f x + 2 i \, e\right )} + 4 i \, a^{3}\right )} \log \left (e^{\left (2 i \, f x + 2 i \, e\right )} + 1\right )}{c f e^{\left (2 i \, f x + 2 i \, e\right )} + c f} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
giac [B] time = 1.03, size = 183, normalized size = 2.58 \[ \frac {2 \, {\left (\frac {2 i \, a^{3} \log \left (\tan \left (\frac {1}{2} \, f x + \frac {1}{2} \, e\right ) + 1\right )}{c} - \frac {4 i \, a^{3} \log \left (\tan \left (\frac {1}{2} \, f x + \frac {1}{2} \, e\right ) + i\right )}{c} + \frac {2 i \, a^{3} \log \left (\tan \left (\frac {1}{2} \, f x + \frac {1}{2} \, e\right ) - 1\right )}{c} + \frac {-2 i \, a^{3} \tan \left (\frac {1}{2} \, f x + \frac {1}{2} \, e\right )^{2} - a^{3} \tan \left (\frac {1}{2} \, f x + \frac {1}{2} \, e\right ) + 2 i \, a^{3}}{{\left (\tan \left (\frac {1}{2} \, f x + \frac {1}{2} \, e\right )^{2} - 1\right )} c} + \frac {6 i \, a^{3} \tan \left (\frac {1}{2} \, f x + \frac {1}{2} \, e\right )^{2} - 16 \, a^{3} \tan \left (\frac {1}{2} \, f x + \frac {1}{2} \, e\right ) - 6 i \, a^{3}}{c {\left (\tan \left (\frac {1}{2} \, f x + \frac {1}{2} \, e\right ) + i\right )}^{2}}\right )}}{f} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maple [A] time = 0.20, size = 62, normalized size = 0.87 \[ \frac {a^{3} \tan \left (f x +e \right )}{c f}+\frac {4 a^{3}}{f c \left (\tan \left (f x +e \right )+i\right )}-\frac {4 i a^{3} \ln \left (\tan \left (f x +e \right )+i\right )}{f c} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maxima [F(-2)] time = 0.00, size = 0, normalized size = 0.00 \[ \text {Exception raised: RuntimeError} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
mupad [B] time = 4.62, size = 61, normalized size = 0.86 \[ \frac {a^3\,\mathrm {tan}\left (e+f\,x\right )}{c\,f}+\frac {4\,a^3}{c\,f\,\left (\mathrm {tan}\left (e+f\,x\right )+1{}\mathrm {i}\right )}-\frac {a^3\,\ln \left (\mathrm {tan}\left (e+f\,x\right )+1{}\mathrm {i}\right )\,4{}\mathrm {i}}{c\,f} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
sympy [A] time = 0.39, size = 102, normalized size = 1.44 \[ - \frac {2 i a^{3}}{- c f e^{2 i e} e^{2 i f x} - c f} + \frac {4 i a^{3} \log {\left (e^{2 i f x} + e^{- 2 i e} \right )}}{c f} + \begin {cases} - \frac {2 i a^{3} e^{2 i e} e^{2 i f x}}{c f} & \text {for}\: c f \neq 0 \\\frac {4 a^{3} x e^{2 i e}}{c} & \text {otherwise} \end {cases} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________